package com.bilgeadam.observerpattern.program;

import java.util.ArrayList;

/**
 *
 * @author Bora SAYINER
 * @since Dec 14, 2014 10:53:14 AM
 * @version 1.0
 */
public class Yaysat {

	private ArrayList<Abone> aboneler;
	
	public Yaysat() {
		this.aboneler = new ArrayList<Abone>();
	}
	
	public void aboneEkle(Abone abone){
		aboneler.add(abone);
	}
	
	public void aboneSil(Abone abone) {
		aboneler.remove(abone);
	}
	
	public void yeniGazeteyiDagit(){
		for (int i = 0; i < aboneler.size(); i++) {
			aboneler.get(i).yeniGazeteyiAl("fb:4-ss:1");
		}
	}
}
